1. Field of the Invention
The present invention relates generally to the field of computer networking, and more specifically, to internetworking devices.
2. Related Art
An internetworking device is a device that facilitates communication between computers. In one example, an internetworking device is a device that connects two or more networks to form a larger network, called an internet. An example of such a device is a router. Another example of such a device is a bridge. An internetworking device may also enable a remote computer to communicate with another computer (usually a server) through a dial-up or integrated services digital network (ISDN) connection. Such an internetworking device is said to provide remote access services. By definition, an internetworking device has two or more input/output (I/O) interfaces, also referred to as network interfaces.
Conventionally, an internetworking device is configured with one or more network interface cards (NICs) for connecting the internetworking device to one or more networks and/or hosts. A conventional internetworking device is also configured with a manager card for, among other things, managing the internetworking device.
When a NIC of a conventional internetworking device receives a network layer packet, such as in internet protocol (IP) packet, that is addressed to the internetworking device, the NIC forwards the network layer packet to the manager card for processing. As the amount of data traffic increases in a network, so may the number of network layer packets that are forwarded to the manager card for processing. The conventional approach to handling this increased packet processing pressure on the manager card is to equip the manager card with faster microprocessors and with additional memory chips. However, this approach to the problem is expensive. Furthermore, even with faster microprocessors, the manager card may not be able to process packets as quickly as it is receiving them, thus degrading the performance of the internetworking device.
What is needed, therefore, is an improved internetworking device that is able to effectively deal with the increase in packet processing demands.
The present invention provides an improved internetworking device. In one embodiment the present invention provides an internetworking device having a set of network interface cards, where each network interface card is able to address and send data directly to any of the other network interface cards. According to one embodiment, when one of the network interface cards receives a network layer packet, a process running on that network interface card determines a destination address of the network layer packet and determines whether the destination address matches a network layer address of the internetworking device. If the destination address does not match a network layer address of the internetworking device, the process further determines, based on the destination address of the network layer packet, the network interface card to which the network layer packet should be forwarded. Otherwise the process examines a destination port field within a transport layer packet encapsulated by the network layer packet to determine a destination port number. The process then determines, based at least in part on the destination port number, the network interface card to which the network layer packet should be forwarded. In this manner, transport layer processing does not have to be centralized within the internetworking device. Instead, the present invention allows each network interface card to have a transport layer process.
Advantageously, each network interface card further includes a memory for storing a network layer forwarding database and at least one transport layer forwarding database. Preferably, the memory stores a transport layer forwarding database for each transport layer protocol supported by the internetworking device. In one embodiment, when a network interface card receives a network layer packet and the destination address of the network layer packet matches a network layer address of the internetworking device, a process running on the network interface card utilizes one of the transport layer forwarding databases in determining the network interface card to which the network layer packet should be forwarded.
Preferably, each network interface card includes at least a first transport layer forwarding database and a second transport layer forwarding database, where each transport layer forwarding database includes one or more records. In one embodiment, each of the records of the first transport layer database has a port number field for storing a transmission control protocol (TCP) port number and a corresponding network interface card identifier field for storing a network interface card identifier. Similarly, each of the records of the second transport layer database has a port number field for storing a user datagram protocol (UDP) port number and a corresponding network interface card identifier field for storing a network interface card identifier.
The invention also provides a method for routing a network layer packet within an internetworking device having a set of network interface cards, where each of the network interface cards includes a network layer, a transport layer, and an application layer. When the network layer packet is received at one of the network interface cards, the method includes the following steps: (a) determining a destination address of the network layer packet; (b) if the destination address of the network layer packet does not match a network layer address of the internetworking device, then (1) determining, based on the destination address, the network interface card to which the network layer packet should be forwarded and (2) transmitting the network layer packet from the network interface card that received it to the network interface card to which the network layer packet should be forwarded; and (c) if the destination address of the network layer packet matches a network layer address of the internetworking device, then (1) determining a destination port number of a transport layer packet encapsulated by the network layer packet, (2) determining, based at least in part on the destination port number, the network interface card to which the network layer packet should be forwarded, and (3) transmitting the network layer packet from the network interface card that received it to the network interface card to which the network layer packet should be forwarded.
Further features and advantages of the present invention, as well as the structure and operation of various embodiments of the present invention, are described in detail below with reference to the accompanying drawings.